
<div class="heading-buttons">
	<h3 class="glyphicons globe">
		<i></i> Location Management
	</h3>



</div>
<div class="separator"></div>



<div class="widget widget-2 widget-body-white">
	<div class="widget-head">
		<h4 class="heading glyphicons globe">
			<i></i> Add New State
		</h4>



	</div>
	<div class="widget-body">


		<div class="block">
			<fieldset>
				<form name="cat" method="POST"
					action="<?= base_url(); ?>secure/location/location_management/insert_state">


					<?php
					if ($this->session->flashdata('message')) {
						$msg = $this->session->flashdata('message');
						echo '<font color="red">' . $msg . '</font>';
					}
					?>

					<input name="state" id="state" class="span5" type="text"
						onfocus="if(this.value=='Enter States')this.value='';"
						onblur="if(this.value=='')this.value='Enter States';"
						value="Enter States" />
					<div id="link-button" style="float: right">
						<input type="hidden" name="state_id" value="<?= $id;?>"> <input
							type="hidden" name="country_id" value="<?= $country_id;?>"> <input
							type="submit" class="btn btn-inverse margin-right " name="insert"
							value="Add State"
							<?php if($this->config->item('mode')=='DEMO'){?>
							onclick="alert ('Sorry! Not allowed in demo mode '); return false;"
							<?} else?> onclick="return confirm('Are you sure ?');" />
					</div>
				</form>
			</fieldset>

		</div>

	</div>
</div>
<div class="widget widget-2 widget-body-white finances_summary">
	<?php if($state['all']){?>
	<div class="widget-head">
		<h4 class="heading glyphicons globe">
			<i></i> State Management:
			<?= $this->admin_location_model->get_country_name($country_id); ?>
		</h4>



	</div>
	<div class="widget-body">

		<div class="block">
			<fieldset>
				<?php foreach ($state['all'] as $states): ?>
				<form name="category" method="POST"
					action="<?= base_url(); ?>secure/location/location_management/state_update">

					<div class="row-fluid clearfix" style="margin-bottom: 2px">
						<input name="state_id" type="hidden" size="0"
							value="<?= $states->id; ?>" /> <input name="country_id"
							type="hidden" size="0" value="<?= $states->countryid; ?>" /> <input
							name="state_detail" class="span8" type="text"
							value="<?= $states->statename; ?>" />




						<div id="link-button" style="float: right">

							<input type="submit" class="btn btn-primary" name="Update"
								value="Update" <?php if($this->config->item('mode')=='DEMO'){?>
								onclick="alert ('Sorry! Not allowed in demo mode '); return false;"
							<?} else?> onclick="return confirm('Are you sure ?');" /> <a
								href="<?= base_url(); ?>secure/location/location_management/state_delete?state_id=<?= $states->id; ?>&country_id=<?= $states->countryid; ?>"
								<?php if($this->config->item('mode')=='DEMO'){?>
								onclick="alert ('Sorry! Not allowed in demo mode '); return false;"
								<?} else?> onclick="return confirm('Are you sure ?');"><span
								class="btn btn-danger"> Delete</span> </a> <a
								href="<?= base_url(); ?>secure/location/location_management/city/<?= $states->id; ?>/<?= $states->countryid; ?>">
								<span class="btn btn-info"> View City</span>
							</a>
						</div>
					</div>
				</form>
				<?php endforeach;
} ?>
			</fieldset>



		</div>


<div class="pagination pull-right">
		<ul>
			<li><?php  echo $this->pagination->create_links(); ?>
			</li>
		</ul>
	</div>

	</div>
	


</div>







